/**
 * Created by Ysssssss on 2021/4/21.
 */
import { arrayToObject } from "@utils/arrayHelper";

export const SHOPPING_MALL_ORDER_STATUS_LIST =  [
    {
        id: '',
        name: '全部'
    }, {
        id: 1,
        name: '待付款',
        notSearch: true,
    }, {
        id: 2,
        name: '待备/发货'
    }, {
        id: 3,
        name: '待提/收货'
    }, {
        id: 4,
        name: '已完成'
    }, {
        id: 5,
        name: '已关闭'
    }
]

export const SHOPPING_MALL_ORDER_STATUS_CODE = {
    'await_pay': 1,
    'prepare_products': 2,
    // 'await_self_take': 3,
    // 'await_express': 4,
    'await_receipt': 3,
    'finished': 4,
    'closed': 5
}

export const SHOPPING_MALL_ORDER_STATUS = arrayToObject(SHOPPING_MALL_ORDER_STATUS_LIST.slice(1), 'id', 'name')

export const SHOPPING_MALL_REFUND_TYPE_LIST = [
    {
        id: 1,
        name: '仅退款'
    }, {
        id: 2,
        name: '退货退款'
    }, {
        id: 3,
        name: '整单取消'
    }
]

export const SHOPPING_MALL_REFUND_TYPE = arrayToObject(SHOPPING_MALL_REFUND_TYPE_LIST, 'id', 'name')

export const SHOPPING_MALL_AFTER_SALES_STATUS_LIST = [
    {
        id: 1,
        name: '待处理'
    },
    {
        id: 2,
        name: '退款中'
    },
    {
        id: 3,
        name: '退款失败'
    },
    {
        id: 4,
        name: '退款成功'
    },
    {
        id: 5,
        name: '审核拒绝'
    },
    {
        id: 6,
        name: '退款关闭'
    },
    {
        id: 7,
        name: '待客户寄回'
    },
    {
        id: 8,
        name: '待仓库入库'
    },
    {
        id: 9,
        name: '拒绝入库'
    },
]

export const SHOPPING_MALL_AFTER_SALES_STATUS_CODE = {
    applying: 1,
    'await_refund': 2,
    failed: 3,
    success: 4,
    rejected: 5,
    closed: 6,
    'await_return': 7,
    'await_store': 8,
    'warehouse_rejected': 9
}

export const SHOPPING_MALL_AFTER_SALES_STATUS_STR = arrayToObject(SHOPPING_MALL_AFTER_SALES_STATUS_LIST, 'id', 'name')


// REFUND_STATUS_STR REFUND_STATUS_LIST